package com.tang.gulimall.gateway;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;

/*
* 开启服务的注册于发现
*
* 报错:If you want an embedded database (H2, HSQL or Derby), please put it on the classpath. 应为在类路劲下找不到数据源的配置
*  解决:  在这个注解加上排除数据源的配置   @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})  //排除数据库相关配置
* */
@EnableDiscoveryClient
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})  //排除数据库相关配置
public class GulimallGatewayApplication {

    public static void main(String[] args) {
        SpringApplication.run(GulimallGatewayApplication.class, args);
    }

}
